FF8 PS1, NTSC-U SLUS-00892, Decompressor and Compressor

These are Python3 Programs that must be executed using Python.

The Decompressor expects a single block of compressed binary data named "FF8cmpblock.bin"
and will output a binary file named "FF8decmp.bin". If it doesn't want to output
the file you can create an empty hex file with a hex editor to recieve it.

The output directory will be consistent with your Python 3 output directory or the
output directory of whatever IDE you're using.

You must first locate and extract the block you want to decompress into a 
binary file and name that file "FF8cmp.bin". The length of the compressed data is contained
within the 1st 4 bytes of the compressed block. So if you extract only a partial section
the Decompressor will fail. If you really want to decompress a small portion, you can 
insert the length yourself into the first 4 bytes of the file via a hex editor.
However if you extract excess data the program will ignore anything beyond length
provided.

The compressor will accept the previous decompressed file named "FF8decmp.bin" and 
output a file named "FFrecmp.bin". Again you can create the file if it won't output it.
This will include any changes you have made.

You can then, overwrite the IMG compressed data with yours, without changing the
size of the IMG. Provided there is enough free space to accept your block.

Included is a copy of a text by abridgewater defining how you might locate the compressed
block. 
As an additional tip for locating a specific compressed block:
	1. Set a write breakpoint somewhere as the data is being decompressed in game.
	2. Grab a few bytes from [$t4] (the start of the decompression, where the beginning
	bytes are literal.
	3. Use those bytes to search for a match in the File should help you idenify the
	compressed block.
	
ALWAYS create a back up of your games before making changes!!!